//
//  MyFiveCollectionViewCell.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/11/20.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "MyFiveCollectionViewCell.h"

@implementation MyFiveCollectionViewCell
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatUI];
        
    }
    return self;
}
-(void)creatUI{
    _img = [[UIImageView alloc]init];
    //    _img.backgroundColor = [UIColor redColor];
    [self addSubview:_img];
    [_img mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView.mas_top).with.offset(8);
        make.height.mas_equalTo(25);
        make.width.mas_equalTo(25);
        make.centerX.mas_equalTo(self);
    }];
    
    _lab = [[UILabel alloc]init];
    _lab.textColor = [UIColor grayColor];
    _lab.font = [UIFont systemFontOfSize:14.0];
    _lab.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_lab];
    [_lab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_img.mas_bottom).with.offset(8);
        //        make.bottom.equalTo(line.mas_top).with.offset(2);
        make.left.equalTo(self.contentView.mas_left).with.offset(2);
        make.right.equalTo(self.contentView.mas_right).with.offset(-2);
        make.height.mas_equalTo(20);
    }];
}
@end
